import request from '@/utils/request'

// 查询分配管理列表
export function listDealUserDistribution(query) {
  return request({
    url: '/distribution/dealUserDistribution/list',
    method: 'get',
    params: query
  })
}

// 查询分配管理列表合计
export function getDealUserDistributionSum(query) {
  return request({
    url: '/distribution/dealUserDistribution/getSum',
    method: 'get',
    params: query
  })
}

// 查询分配管理详细
export function getDealUserDistribution(id, dealId) {
  return request({
    url: '/distribution/dealUserDistribution/' + id + '/' + dealId,
    method: 'get'
  })
}

// 保存分配管理
export function saveDealUserDistribution(data) {
  return request({
    url: '/distribution/dealUserDistribution/save',
    method: 'post',
    data: data
  })
}

// 删除分配管理
export function delDealUserDistribution(id) {
  return request({
    url: '/distribution/dealUserDistribution/' + id,
    method: 'delete'
  })
}

// 导出分配管理
export function exportDealUserDistribution(query) {
  return request({
    url: '/distribution/dealUserDistribution/export',
    method: 'get',
    params: query
  })
}
// 查询项目跟投明细
export function getDealInvest(dealId) {
  return request({
    url: '/investment/dealUserInvestment/getDealInvest?dealId=' + dealId,
    method: 'get'
  })
}
